Skip to content

feat(rag:etl): Add custom template support to KeywordMetadataEnricher #3252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YunKuiLu
Copy link
Contributor

@YunKuiLu YunKuiLu commented May 19, 2025

  • Support the use of custom templates
  • Adding builder pattern
  • Adding unit tests
  • Adjusted the relevant documents

If this PR is merged, it will also solve the following issues:
#2698

- Support the use of custom templates
- Adding builder pattern
- Adding unit tests
- Adjusted the relevant documents

Signed-off-by: YunKui Lu <[email protected]>
@YunKuiLu YunKuiLu changed the title feat: Add custom template support to KeywordMetadataEnricher feat(rag:etl): Add custom template support to KeywordMetadataEnricher May 20, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.x milestone May 28, 2025
@torakiki
Copy link
Contributor

To add on this, the current documentation (1.0.0) says

The keyword extraction prompt can be customized by modifying the KEYWORDS_TEMPLATE constant in the class.

but KEYWORDS_TEMPLATE is final so there isn't at the moment any way to change the template beside creating your own MyKeywordMetadataEnricher.
I needed to change the template because llama3.2 was returning "here are five keywords: bla bla" and I had to be more strict on the prompt adding something like "Return only the comma separated keywords"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants